home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / VECTBAL2.ZIP / XBMTOOLS.H < prev    next >
C/C++ Source or Header  |  1993-09-13  |  2KB  |  64 lines

  1. /*-----------------------------------------------------------------------
  2. ;
  3. ; XPOINT - header file
  4. ;
  5. ;
  6. ;
  7. ; ****** XLIB - Mode X graphics library                ****************
  8. ; ******                                               ****************
  9. ; ****** Written By Themie Gouthas                     ****************
  10. ;
  11. ; Macros written by Mathew Mackenzie
  12. ;
  13. ; egg@dstos3.dsto.gov.au
  14. ; teg@bart.dsto.gov.au
  15. ;
  16. ;  Terminology & notes:
  17. ;         VRAM ==   Video RAM
  18. ;         SRAM ==   System RAM
  19. ;         X coordinates are in pixels unless explicitly stated
  20. ;
  21. ;-----------------------------------------------------------------------*/
  22.  
  23. #ifndef _XBMTOOLS_H_
  24. #define _XBMTOOLS_H_
  25.  
  26. #define BM_WIDTH_ERROR 1
  27.  
  28. #define LBMHeight(lbitmap) lbitmap[1]
  29. #define LBMWidth(lbitmap) lbitmap[0]
  30. #define PBMHeight(pbitmap) pbitmap[1]
  31. #define PBMWidth(pbitmap) (pbitmap[0]<<2)
  32. #define PBMByteWidth(pbitmap) pbitmap[0]
  33.  
  34. #define LBMPutPix(x,y,lbitmap,color)  \
  35.     lbitmap[2 + (x) + (y) * LBMWidth(lbitmap)] = color
  36.  
  37. #define LBMGetPix(x,y,lbitmap)  \
  38.     (lbitmap[2 + (x) + (y) * LBMWidth(lbitmap)])
  39.  
  40.  
  41.  
  42. /* FUNCTIONS =========================================================== */
  43.  
  44. #ifdef __cplusplus
  45. extern "C" {
  46. #endif
  47.  
  48.  int x_pbm_to_bm(           /* Convert from planar bitmap to linear */
  49.    char far * source_pbm,
  50.    char far * dest_bm);
  51.  
  52.  int x_bm_to_pbm(           /* Convert from linear bitmap to planar */
  53.    char far * source_pbm,
  54.    char far * dest_bm);
  55.  
  56. #ifdef __cplusplus
  57. }
  58. #endif
  59.  
  60.  
  61. #endif
  62.  
  63.  
  64.